package com.baymax.exception;

import lombok.Getter;
import org.springframework.http.HttpStatus;

/**
 * 统一异常处理
 *
 * @Author: baymax
 * @CreateTime: 2023/3/30 16:33
 * @Version: 1.0
 */
@Getter
public class GlobalException extends RuntimeException {

    private Integer status = HttpStatus.BAD_REQUEST.value();

    public GlobalException(String msg) {
        super(msg);
    }

    public GlobalException(HttpStatus status, String msg) {
        super(msg);
        this.status = status.value();
    }

}
